package conf2.text;

import conf2.model.EActor;
import java.util.EnumMap;
import java.util.Map;
import static conf2.model.EActor.*;

public class Actors {

    private static Map<EActor, String> names = new EnumMap<EActor, String>(EActor.class);
    private static Map<EActor, String> portraitNames = new EnumMap<EActor, String>(EActor.class);
    private static Map<EActor, String> pieceNames = new EnumMap<EActor, String>(EActor.class);
    private static Map<EActor, String> descriptions = new EnumMap<EActor, String>(EActor.class);


    static {
        names.put(C_FRODO, "Frodo");
        names.put(C_SAM, "Sam");
        names.put(C_MERRY, "Merry");
        names.put(C_PIPPIN, "Pippin");
        names.put(C_GANDALF, "Gandalf");
        names.put(C_ARAGORN, "Aragorn");
        names.put(C_GIMLI, "Gimli");
        names.put(C_LEGOLAS, "Legolas");
        names.put(C_BOROMIR, "Boromir");

        names.put(C_CAVETROLL, "Cave Troll");
        names.put(C_WARG, "Warg");
        names.put(C_BALROG, "Balrog");
        names.put(C_SHELOB, "Shelob");
        names.put(C_WITCHKING, "Witch King");
        names.put(C_ORCS, "Orcs");
        names.put(C_F_NAZGUL, "Flying Nazgûl");
        names.put(C_B_RIDERS, "Black Riders");
        names.put(C_SARUMAN, "Saruman");

        names.put(V_FRODO, "Frodo");
        names.put(V_SAM, "Sam");
        names.put(V_THEODEN, "Theoden");
        names.put(V_SMEAGOL, "Smeagol");
        names.put(V_GANDALF, "Gandalf");
        names.put(V_ARAGORN, "Aragorn");
        names.put(V_ELROND, "Elrond");
        names.put(V_TREEBEARD, "Treebeard");
        names.put(V_FARAMIR, "Faramir");

        names.put(V_WITCHKING, "Witch King");
        names.put(V_ORCS, "Orcs");
        names.put(V_F_NAZGUL, "Flying Nazgûl");
        names.put(V_GOLLUM, "Gollum");
        names.put(V_SARUMAN, "Saruman");
        names.put(V_MOUTHOFSAURON, "Mouth of Sauron");
        names.put(V_URUKHAI, "Uruk-Hai");
        names.put(V_WATCHER, "The Watcher");
        names.put(V_WORMTONGUE, "Wormtongue");

        portraitNames.put(C_FRODO, "Frodo");
        portraitNames.put(C_SAM, "Sam");
        portraitNames.put(C_MERRY, "Merry");
        portraitNames.put(C_PIPPIN, "Pippin");
        portraitNames.put(C_GANDALF, "Gandalf");
        portraitNames.put(C_ARAGORN, "Aragorn");
        portraitNames.put(C_GIMLI, "Gimli");
        portraitNames.put(C_LEGOLAS, "Legolas");
        portraitNames.put(C_BOROMIR, "Boromir");

        portraitNames.put(C_CAVETROLL, "Cave Troll");
        portraitNames.put(C_WARG, "Warg");
        portraitNames.put(C_BALROG, "Balrog");
        portraitNames.put(C_SHELOB, "Shelob");
        portraitNames.put(C_WITCHKING, "Witch King");
        portraitNames.put(C_ORCS, "Orcs");
        portraitNames.put(C_F_NAZGUL, "F. Nazgûl");
        portraitNames.put(C_B_RIDERS, "B. Riders");
        portraitNames.put(C_SARUMAN, "Saruman");

        portraitNames.put(V_FRODO, "Frodo");
        portraitNames.put(V_SAM, "Sam");
        portraitNames.put(V_THEODEN, "Theoden");
        portraitNames.put(V_SMEAGOL, "Smeagol");
        portraitNames.put(V_GANDALF, "Gandalf");
        portraitNames.put(V_ARAGORN, "Aragorn");
        portraitNames.put(V_ELROND, "Elrond");
        portraitNames.put(V_TREEBEARD, "Treebeard");
        portraitNames.put(V_FARAMIR, "Faramir");

        portraitNames.put(V_WITCHKING, "Witch King");
        portraitNames.put(V_ORCS, "Orcs");
        portraitNames.put(V_F_NAZGUL, "F. Nazgûl");
        portraitNames.put(V_GOLLUM, "Gollum");
        portraitNames.put(V_SARUMAN, "Saruman");
        portraitNames.put(V_MOUTHOFSAURON, "Mouth");
        portraitNames.put(V_URUKHAI, "Uruk-Hai");
        portraitNames.put(V_WATCHER, "The Watcher");
        portraitNames.put(V_WORMTONGUE, "Wormtongue");

        pieceNames.put(C_FRODO, "Frodo");
        pieceNames.put(C_SAM, "Sam");
        pieceNames.put(C_MERRY, "Merry");
        pieceNames.put(C_PIPPIN, "Pippin");
        pieceNames.put(C_GANDALF, "Gandalf");
        pieceNames.put(C_ARAGORN, "Aragorn");
        pieceNames.put(C_GIMLI, "Gimli");
        pieceNames.put(C_LEGOLAS, "Legolas");
        pieceNames.put(C_BOROMIR, "Boromir");

        pieceNames.put(C_CAVETROLL, "C.Troll");
        pieceNames.put(C_WARG, "Warg");
        pieceNames.put(C_BALROG, "Balrog");
        pieceNames.put(C_SHELOB, "Shelob");
        pieceNames.put(C_WITCHKING, "W.King");
        pieceNames.put(C_ORCS, "Orcs");
        pieceNames.put(C_F_NAZGUL, "F.Nazg.");
        pieceNames.put(C_B_RIDERS, "Riders");
        pieceNames.put(C_SARUMAN, "Saruman");

        pieceNames.put(V_FRODO, "Frodo");
        pieceNames.put(V_SAM, "Sam");
        pieceNames.put(V_THEODEN, "Theoden");
        pieceNames.put(V_SMEAGOL, "Smeagol");
        pieceNames.put(V_GANDALF, "Gandalf");
        pieceNames.put(V_ARAGORN, "Aragorn");
        pieceNames.put(V_ELROND, "Elrond");
        pieceNames.put(V_TREEBEARD, "Treebd.");
        pieceNames.put(V_FARAMIR, "Faramir");

        pieceNames.put(V_WITCHKING, "W.King");
        pieceNames.put(V_ORCS, "Orcs");
        pieceNames.put(V_F_NAZGUL, "F.Nazg.");
        pieceNames.put(V_GOLLUM, "Gollum");
        pieceNames.put(V_SARUMAN, "Saruman");
        pieceNames.put(V_MOUTHOFSAURON, "Mouth");
        pieceNames.put(V_URUKHAI, "Uruk-Hai");
        pieceNames.put(V_WATCHER, "Watcher");
        pieceNames.put(V_WORMTONGUE, "Gríma");

        descriptions.put(C_FRODO, "When attacked, may retreat sideways.");
        descriptions.put(C_SAM, "When with Frodo, is strength 5 and may take Frodo's place in battle.");
        descriptions.put(C_MERRY, "Instantly defeats the Witch King.");
        descriptions.put(C_PIPPIN, "When attacking, may retreat backwards.");
        descriptions.put(C_GANDALF, "The Dark player must play their card first.");
        descriptions.put(C_ARAGORN, "May attack any adjacent region.");
        descriptions.put(C_GIMLI, "Instantly defeats the Orcs.");
        descriptions.put(C_LEGOLAS, "Instantly defeats the Flying Nazgûl.");
        descriptions.put(C_BOROMIR, "Both Boromir and the enemy character are instantly defeated.");

        descriptions.put(C_CAVETROLL, "The Dark player's card has no value or effect.");
        descriptions.put(C_WARG, "Enemy character's text is ignored.");
        descriptions.put(C_BALROG, "When in Moria, instantly defeats any character using the tunnel.");
        descriptions.put(C_SHELOB, "After Shelob defeats an enemy character, she is immediately returned to Gondor.");
        descriptions.put(C_WITCHKING, "May attack sideways.");
        descriptions.put(C_ORCS, "When attacking, instantly defeat the first character.");
        descriptions.put(C_F_NAZGUL, "May attack a single enemy character anywhere on the board.");
        descriptions.put(C_B_RIDERS, "May move forward any number of regions to attack.");
        descriptions.put(C_SARUMAN, "May decide that no cards are played.");

        descriptions.put(V_FRODO, "The opponent's text card is ignored. If Frodo is defeated, Sam is the new Ringbearer.");
        descriptions.put(V_SAM, "If attacked, Sam's strength is equal to that of the enemy character.");
        descriptions.put(V_THEODEN, "Is strength 4 in Rohan and Gondor.");
        descriptions.put(V_SMEAGOL, "When attacked alone, may switch with any adjacent Light character.");
        descriptions.put(V_GANDALF, "Reveal Gandalf (after cards are played) to add 1 to the strength of another character in Gandalf's or an adjacent region.");
        descriptions.put(V_ARAGORN, "If attacked, may decide that no cards are played.");
        descriptions.put(V_ELROND, "The Dark player's <i>Magic</i> and <i>Eye of Sauron</i> cards are ignored.");
        descriptions.put(V_TREEBEARD, "May attack a single enemy character in Fangorn. Is strength 6 in Fangorn.");
        descriptions.put(V_FARAMIR, "When attacking, may retreat sideways.");

        descriptions.put(V_WITCHKING, "If the Witch King enters The Shire, the Dark player immediately wins the round.");
        descriptions.put(V_ORCS, "Is strength 6 when attacking.");
        descriptions.put(V_F_NAZGUL, "May move forward, skipping over one region, to attack.");
        descriptions.put(V_GOLLUM, "When attacked or attacking, may retreat forward.");
        descriptions.put(V_SARUMAN, "Instantly defeats Gandalf. After the Light player reveals their card, Saruman may force them to choose a different card.");
        descriptions.put(V_MOUTHOFSAURON, "After cards are revealed, may replace his card with the \"4\" strength card.");
        descriptions.put(V_URUKHAI, "May be revealed to move forward any number of regions to an empty region.");
        descriptions.put(V_WATCHER, "Once revealed, remains revealed and may not move forward.");
        descriptions.put(V_WORMTONGUE, "If defeated, may retreat backwards into an empty region.");
    }

    public static String getName(EActor ea) {
        return names.get(ea);
    }

    public static String getPortraitName(EActor ea) {
        return portraitNames.get(ea);
    }

    public static String getPieceName(EActor ea) {
        return pieceNames.get(ea);
    }

    public static String getDescription(EActor ea) {
        return descriptions.get(ea);
    }
}
